{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>资讯详情</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">头条标题：</label>
                            <div class="layui-input-block">
                                <input type="text" value="{$list['information_title']}" name="information_title" lay-verify="required" placeholder="头条标题" class="layui-input ">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md10">
                            <label class="layui-form-label">内容：</label>
                            <div class="layui-input-block" >
                                <textarea id="LAY_editor2">{$list['information_content']}</textarea>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">封面图：</label>
                            <div class="layui-input-block">
                                <img src="{$list['information_thumb']}?{$list['information_thumb']}:''" style="width:300px;height:200px">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                                <label class="layui-form-label">发布人：</label>
                                <div class="layui-input-block">
                                    <input type="text" value="{$list['user_username1']}" name="information_title" lay-verify="required" class="layui-input ">
                                </div>
                            </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                                <label class="layui-form-label">最后编辑人：</label>
                                <div class="layui-input-block">
                                    <input type="text" value="{$list['username']}" name="information_title" lay-verify="required"class="layui-input ">
                                </div>
                            </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">发布时间：</label>
                            <div class="layui-input-block">
                                <input type="text" value="{$list['information_fa_time']}" name="information_title" lay-verify="required"  class="layui-input ">

                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                                <label class="layui-form-label">最后修改时间：</label>
                                <div class="layui-input-block">
                                    <input type="text" value="{$list['information_time']}" name="information_title" lay-verify="required" class="layui-input ">
                                </div>
                            </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
//    var editor = wk.wang({elem:'#LAY_editor'});
    //百度富文本编辑器
    var ue = wk.UEditor({id:"LAY_editor2",cloud:true,uploadimage:'/admin/Upload/ueditorUpload',uploadscrawl:'/admin/Upload/uploadScrawl',uploadfile:'/admin/Upload/ueditorUpload'});
    var n = wk.uploads({num:12,type:'png,jpg,gif',url:"{:url('admin/upload/uploadLocality')}"});

    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('add')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        wk.success(res.msg,"{:url('information/index')}")
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>

</body>
</html>
